package com.flyduck.vueshop.order.feign;

import com.flyduck.vueshop.common.core.lang.Result;
import com.flyduck.vueshop.order.fallback.RemoteOrderFallback;
import com.flyduck.vueshop.order.fallback.RemoteOrderItemFallback;
import com.flyduck.vueshop.order.vo.RemoteOrderItemRespVO;
import com.flyduck.vueshop.order.vo.RemoteOrderItemUpdateReqVO;
import com.flyduck.vueshop.order.vo.RemoteOrderRespVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * <p>
 * RemoteOrderFeignClient
 * </p>
 *
 * @author flyduck
 * @since 2024-07-23
 */
@FeignClient(name = "vueshop-service-order",contextId = "remoteOrderItemFeignClient",fallback = RemoteOrderItemFallback.class)
public interface RemoteOrderItemFeignClient {
    @GetMapping("/order/remote/orderItem/getOrderItemById/{id}")
    Result<RemoteOrderItemRespVO> getOrderItemById(@PathVariable("id") Long id);

    @GetMapping("/order/remote/orderItem/updateOrderItem")
    Result<Void> updateOrderItem(@RequestBody RemoteOrderItemUpdateReqVO remoteOrderItemUpdateReqVO);
}
